<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: lib/timer.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">timer.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>timer functions  
<a href="#details">More...</a></p>

<p><a href="timer_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTIMERS.html">TIMERS</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">user timer struct  <a href="structTIMERS.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a492a379b00d0ec04be9cd0994e0b42ae"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a492a379b00d0ec04be9cd0994e0b42ae">MAX_TIMER_CNT</a>&#160;&#160;&#160;8</td></tr>
<tr class="memdesc:a492a379b00d0ec04be9cd0994e0b42ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of user timer tasks.  <a href="#a492a379b00d0ec04be9cd0994e0b42ae">More...</a><br /></td></tr>
<tr class="separator:a492a379b00d0ec04be9cd0994e0b42ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0ca52f7bb0e2b7993bbcb75495d7904"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#ac0ca52f7bb0e2b7993bbcb75495d7904">SYSTEM_TASK_TIC_NS</a>&#160;&#160;&#160;( 1000000000L / SYSTEM_TASK_HZ )</td></tr>
<tr class="memdesc:ac0ca52f7bb0e2b7993bbcb75495d7904"><td class="mdescLeft">&#160;</td><td class="mdescRight">System task in HZ.  <a href="#ac0ca52f7bb0e2b7993bbcb75495d7904">More...</a><br /></td></tr>
<tr class="separator:ac0ca52f7bb0e2b7993bbcb75495d7904"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e0b78d1697fa3781598373f4e161ea3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a7e0b78d1697fa3781598373f4e161ea3">SYSTEM_TASK_TIC_US</a>&#160;&#160;&#160;( 1000000L / SYSTEM_TASK_HZ )</td></tr>
<tr class="memdesc:a7e0b78d1697fa3781598373f4e161ea3"><td class="mdescLeft">&#160;</td><td class="mdescRight">System task in Microseconds.  <a href="#a7e0b78d1697fa3781598373f4e161ea3">More...</a><br /></td></tr>
<tr class="separator:a7e0b78d1697fa3781598373f4e161ea3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4068229bfd30e574c7a9f1a8c6687582"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a4068229bfd30e574c7a9f1a8c6687582">CLOCK_HZ</a>&#160;&#160;&#160;<a class="el" href="user__config_8h.html#ab29f444706056b13bca09e97c909bbc5">SYSTEM_TASK_HZ</a></td></tr>
<tr class="memdesc:a4068229bfd30e574c7a9f1a8c6687582"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clock task in HZ defined as System task.  <a href="#a4068229bfd30e574c7a9f1a8c6687582">More...</a><br /></td></tr>
<tr class="separator:a4068229bfd30e574c7a9f1a8c6687582"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6aacf2441874a27f25ae927bbddf1235"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a6aacf2441874a27f25ae927bbddf1235">CLOCK_TIC_NS</a>&#160;&#160;&#160;<a class="el" href="timer_8h.html#ac0ca52f7bb0e2b7993bbcb75495d7904">SYSTEM_TASK_TIC_NS</a></td></tr>
<tr class="memdesc:a6aacf2441874a27f25ae927bbddf1235"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clock task in Nanoseconds defined as System Task.  <a href="#a6aacf2441874a27f25ae927bbddf1235">More...</a><br /></td></tr>
<tr class="separator:a6aacf2441874a27f25ae927bbddf1235"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1aa52cddadb40365ae68d2c45600d684"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a1aa52cddadb40365ae68d2c45600d684">CLOCK_TIC_US</a>&#160;&#160;&#160;<a class="el" href="timer_8h.html#a7e0b78d1697fa3781598373f4e161ea3">SYSTEM_TASK_TIC_US</a></td></tr>
<tr class="memdesc:a1aa52cddadb40365ae68d2c45600d684"><td class="mdescLeft">&#160;</td><td class="mdescRight">CLock task in Microseconds defined as System Task.  <a href="#a1aa52cddadb40365ae68d2c45600d684">More...</a><br /></td></tr>
<tr class="separator:a1aa52cddadb40365ae68d2c45600d684"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:afeece078c6706f33383bf11bbf584518"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a></td></tr>
<tr class="memdesc:afeece078c6706f33383bf11bbf584518"><td class="mdescLeft">&#160;</td><td class="mdescRight">type of clockid_t.  <a href="#afeece078c6706f33383bf11bbf584518">More...</a><br /></td></tr>
<tr class="separator:afeece078c6706f33383bf11bbf584518"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a35f94fb84f1b626d8d1ace062b26c932"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a35f94fb84f1b626d8d1ace062b26c932">set_timers</a> (void(*handler)(void), int timer)</td></tr>
<tr class="memdesc:a35f94fb84f1b626d8d1ace062b26c932"><td class="mdescLeft">&#160;</td><td class="mdescRight">Install a user timer task.  <a href="#a35f94fb84f1b626d8d1ace062b26c932">More...</a><br /></td></tr>
<tr class="separator:a35f94fb84f1b626d8d1ace062b26c932"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71c3fe0e245c7b08e03a2fe0fbd88844"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a71c3fe0e245c7b08e03a2fe0fbd88844">kill_timer</a> (int timer)</td></tr>
<tr class="memdesc:a71c3fe0e245c7b08e03a2fe0fbd88844"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete "Kill" one user timer task.  <a href="#a71c3fe0e245c7b08e03a2fe0fbd88844">More...</a><br /></td></tr>
<tr class="separator:a71c3fe0e245c7b08e03a2fe0fbd88844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b27b84577f0a45741aa4b1de370df66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a4b27b84577f0a45741aa4b1de370df66">delete_all_timers</a> (void)</td></tr>
<tr class="memdesc:a4b27b84577f0a45741aa4b1de370df66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear ALL user timer tasks.  <a href="#a4b27b84577f0a45741aa4b1de370df66">More...</a><br /></td></tr>
<tr class="separator:a4b27b84577f0a45741aa4b1de370df66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab92d687bae984bd62c3d741f2ba614ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#ab92d687bae984bd62c3d741f2ba614ed">subtract_timespec</a> (<a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *a, <a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *b)</td></tr>
<tr class="memdesc:ab92d687bae984bd62c3d741f2ba614ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">subtract a-= b timespec * structures.  <a href="#ab92d687bae984bd62c3d741f2ba614ed">More...</a><br /></td></tr>
<tr class="separator:ab92d687bae984bd62c3d741f2ba614ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41fb2edea84c2f17c7c6ad6ff87baeff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a41fb2edea84c2f17c7c6ad6ff87baeff">ts_to_str</a> (<a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *val)</td></tr>
<tr class="separator:a41fb2edea84c2f17c7c6ad6ff87baeff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6802af23bc1fe764b975683a0b37fc91"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a6802af23bc1fe764b975683a0b37fc91">display_ts</a> (<a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *val)</td></tr>
<tr class="memdesc:a6802af23bc1fe764b975683a0b37fc91"><td class="mdescLeft">&#160;</td><td class="mdescRight">timespec structure in seconds.nanoseconds.  <a href="#a6802af23bc1fe764b975683a0b37fc91">More...</a><br /></td></tr>
<tr class="separator:a6802af23bc1fe764b975683a0b37fc91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6beae313733d5f16cb62417d41eaca95"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a6beae313733d5f16cb62417d41eaca95">clock_elapsed_begin</a> (void)</td></tr>
<tr class="memdesc:a6beae313733d5f16cb62417d41eaca95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store current struct timespec in __clock_elapsed.  <a href="#a6beae313733d5f16cb62417d41eaca95">More...</a><br /></td></tr>
<tr class="separator:a6beae313733d5f16cb62417d41eaca95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f3dff4c1cc1701dc99d7e1d30ffcc06"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a9f3dff4c1cc1701dc99d7e1d30ffcc06">clock_elapsed_end</a> (char *msg)</td></tr>
<tr class="memdesc:a9f3dff4c1cc1701dc99d7e1d30ffcc06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subtract and display time difference from clock_elapesed_begin().  <a href="#a9f3dff4c1cc1701dc99d7e1d30ffcc06">More...</a><br /></td></tr>
<tr class="separator:a9f3dff4c1cc1701dc99d7e1d30ffcc06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23ba64ca0da1fe41d4c870ada3e8a04e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a23ba64ca0da1fe41d4c870ada3e8a04e">clock_clear</a> (void)</td></tr>
<tr class="memdesc:a23ba64ca0da1fe41d4c870ada3e8a04e"><td class="mdescLeft">&#160;</td><td class="mdescRight">clear time and timezone to 0.  <a href="#a23ba64ca0da1fe41d4c870ada3e8a04e">More...</a><br /></td></tr>
<tr class="separator:a23ba64ca0da1fe41d4c870ada3e8a04e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe2823a39b30ff55fe9326f2b5f0741e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#abe2823a39b30ff55fe9326f2b5f0741e">disable_timers</a> (void)</td></tr>
<tr class="memdesc:abe2823a39b30ff55fe9326f2b5f0741e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable all timer tasks.  <a href="#abe2823a39b30ff55fe9326f2b5f0741e">More...</a><br /></td></tr>
<tr class="separator:abe2823a39b30ff55fe9326f2b5f0741e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e736ce66a2bc05cc14b7a282fa52b73"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a0e736ce66a2bc05cc14b7a282fa52b73">enable_timers</a> (void)</td></tr>
<tr class="memdesc:a0e736ce66a2bc05cc14b7a282fa52b73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable timer tasks.  <a href="#a0e736ce66a2bc05cc14b7a282fa52b73">More...</a><br /></td></tr>
<tr class="separator:a0e736ce66a2bc05cc14b7a282fa52b73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7de37276c1b697f865594c7e5f28e961"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a7de37276c1b697f865594c7e5f28e961">execute_timers</a> (void)</td></tr>
<tr class="memdesc:a7de37276c1b697f865594c7e5f28e961"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute all user timers at SYSTEM_HZ rate. Called by system task.  <a href="#a7de37276c1b697f865594c7e5f28e961">More...</a><br /></td></tr>
<tr class="separator:a7de37276c1b697f865594c7e5f28e961"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa97274e3b8fdcd900c265d3808d5313c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#aa97274e3b8fdcd900c265d3808d5313c">clock_init</a> (void)</td></tr>
<tr class="separator:aa97274e3b8fdcd900c265d3808d5313c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a182d70e09e9436c9c8a2e81b7597f206"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a182d70e09e9436c9c8a2e81b7597f206">clock_task</a> (void)</td></tr>
<tr class="memdesc:a182d70e09e9436c9c8a2e81b7597f206"><td class="mdescLeft">&#160;</td><td class="mdescRight">1000HZ timer task  <a href="#a182d70e09e9436c9c8a2e81b7597f206">More...</a><br /></td></tr>
<tr class="separator:a182d70e09e9436c9c8a2e81b7597f206"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a06b0b10204f441d18c79601b4ee13f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a4a06b0b10204f441d18c79601b4ee13f">init_timers</a> (void)</td></tr>
<tr class="memdesc:a4a06b0b10204f441d18c79601b4ee13f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup all timers tasksi and enable interrupts.  <a href="#a4a06b0b10204f441d18c79601b4ee13f">More...</a><br /></td></tr>
<tr class="separator:a4a06b0b10204f441d18c79601b4ee13f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab507661341c93c415b27ed9d40839539"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#ab507661341c93c415b27ed9d40839539">clock_getres</a> (<a class="el" href="time_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a> clk_id, struct <a class="el" href="structtimespec.html">timespec</a> *res)</td></tr>
<tr class="memdesc:ab507661341c93c415b27ed9d40839539"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read clock time resolution into struct timepec *ts - POSIX function.  <a href="#ab507661341c93c415b27ed9d40839539">More...</a><br /></td></tr>
<tr class="separator:ab507661341c93c415b27ed9d40839539"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ebca9883466f2cc6fea0547e0e64e79"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a4ebca9883466f2cc6fea0547e0e64e79">clock_settime</a> (<a class="el" href="time_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a> clk_id, const struct <a class="el" href="structtimespec.html">timespec</a> *ts)</td></tr>
<tr class="memdesc:a4ebca9883466f2cc6fea0547e0e64e79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set system clock using seconds and nonoseconds - POSIX function.  <a href="#a4ebca9883466f2cc6fea0547e0e64e79">More...</a><br /></td></tr>
<tr class="separator:a4ebca9883466f2cc6fea0547e0e64e79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6e5b6a9c1fb8bc6e2093fca40600bf5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#aa6e5b6a9c1fb8bc6e2093fca40600bf5">clock_gettime</a> (<a class="el" href="time_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a> clk_id, struct <a class="el" href="structtimespec.html">timespec</a> *ts)</td></tr>
<tr class="memdesc:aa6e5b6a9c1fb8bc6e2093fca40600bf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic <a class="el" href="timer_8c.html#aa6e5b6a9c1fb8bc6e2093fca40600bf5" title="Generic clock_gettime() function WITHOUT high resolution. ">clock_gettime()</a> function WITHOUT high resolution.  <a href="#aa6e5b6a9c1fb8bc6e2093fca40600bf5">More...</a><br /></td></tr>
<tr class="separator:aa6e5b6a9c1fb8bc6e2093fca40600bf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45ccd72c3ad32c4f7a5a8ef74d2653b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a45ccd72c3ad32c4f7a5a8ef74d2653b3">disable_system_task</a> (void)</td></tr>
<tr class="separator:a45ccd72c3ad32c4f7a5a8ef74d2653b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9827e02881cff25ff30c35c7d8ed3ac4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a9827e02881cff25ff30c35c7d8ed3ac4">enable_system_task</a> (void)</td></tr>
<tr class="separator:a9827e02881cff25ff30c35c7d8ed3ac4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49353e09a3623d95083574b87e9aadc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a49353e09a3623d95083574b87e9aadc5">install_timers_isr</a> (void)</td></tr>
<tr class="separator:a49353e09a3623d95083574b87e9aadc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>timer functions </p>
<dl class="section user"><dt>Copyright &copy; 2015 Mike Gore, GPL License</dt><dd></dd></dl>
<dl class="section user"><dt>You are free to use this code under the terms of GPL</dt><dd>please retain a copy of this notice in any code you use it in.</dd></dl>
<p>This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </p>

<p>Definition in file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a4068229bfd30e574c7a9f1a8c6687582"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CLOCK_HZ&#160;&#160;&#160;<a class="el" href="user__config_8h.html#ab29f444706056b13bca09e97c909bbc5">SYSTEM_TASK_HZ</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clock task in HZ defined as System task. </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00052">52</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6aacf2441874a27f25ae927bbddf1235"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CLOCK_TIC_NS&#160;&#160;&#160;<a class="el" href="timer_8h.html#ac0ca52f7bb0e2b7993bbcb75495d7904">SYSTEM_TASK_TIC_NS</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clock task in Nanoseconds defined as System Task. </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00054">54</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="a1aa52cddadb40365ae68d2c45600d684"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CLOCK_TIC_US&#160;&#160;&#160;<a class="el" href="timer_8h.html#a7e0b78d1697fa3781598373f4e161ea3">SYSTEM_TASK_TIC_US</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CLock task in Microseconds defined as System Task. </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00056">56</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="a492a379b00d0ec04be9cd0994e0b42ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_TIMER_CNT&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Number of user timer tasks. </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00029">29</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00117">delete_all_timers()</a>, <a class="el" href="timer_8c_source.html#l00261">execute_timers()</a>, <a class="el" href="timer_8c_source.html#l00100">kill_timer()</a>, and <a class="el" href="timer_8c_source.html#l00060">set_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="ac0ca52f7bb0e2b7993bbcb75495d7904"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_TASK_TIC_NS&#160;&#160;&#160;( 1000000000L / SYSTEM_TASK_HZ )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>System task in HZ. </p>
<p>System task in Nanoseconds. </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00047">47</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00329">clock_getres()</a>.</p>

</div>
</div>
<a class="anchor" id="a7e0b78d1697fa3781598373f4e161ea3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_TASK_TIC_US&#160;&#160;&#160;( 1000000L / SYSTEM_TASK_HZ )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>System task in Microseconds. </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00049">49</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="afeece078c6706f33383bf11bbf584518"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> <a class="el" href="time_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>type of clockid_t. </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00032">32</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a23ba64ca0da1fe41d4c870ada3e8a04e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void clock_clear </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>clear time and timezone to 0. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="timer_8c.html#a4ebca9883466f2cc6fea0547e0e64e79" title="Set system clock using seconds and nonoseconds - POSIX function. ">clock_settime()</a>. </dd>
<dd>
<a class="el" href="time_8c.html#aba9a1e17f18817099c795d0559d747a8" title="Set current timezone with struct timezone *tz - POSIX function. ">settimezone()</a>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00221">221</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00293">init_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="a6beae313733d5f16cb62417d41eaca95"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void clock_elapsed_begin </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Store current struct timespec in __clock_elapsed. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="timer_8c.html#aa6e5b6a9c1fb8bc6e2093fca40600bf5" title="Generic clock_gettime() function WITHOUT high resolution. ">clock_gettime()</a> <a class="el" href="posix_8h.html#a1c3d85ae80df5590fa314acffd8bf840">POSIX</a> function.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00184">184</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9f3dff4c1cc1701dc99d7e1d30ffcc06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void clock_elapsed_end </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Subtract and display time difference from clock_elapesed_begin(). </p>
<ul>
<li>Notes: Accuracy is a function of timer resolution, CPU overhead and background tasks.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>User message to proceed Time display.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="timer_8c.html#aa6e5b6a9c1fb8bc6e2093fca40600bf5" title="Generic clock_gettime() function WITHOUT high resolution. ">clock_gettime()</a>. </dd>
<dd>
clock_elapesed_begin(). </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00200">200</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab507661341c93c415b27ed9d40839539"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int clock_getres </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="time_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a>&#160;</td>
          <td class="paramname"><em>clk_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structtimespec.html">timespec</a> *&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read clock time resolution into struct timepec *ts - POSIX function. </p>
<ul>
<li>Note: We ignore clk_id <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">clk_id</td><td>unused hardware clock index. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>timespec resolution result.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd>
<dd>
-1 on error. </dd></dl>
</li>
</ul>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00329">329</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

</div>
</div>
<a class="anchor" id="aa6e5b6a9c1fb8bc6e2093fca40600bf5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int clock_gettime </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="time_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a>&#160;</td>
          <td class="paramname"><em>clk_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structtimespec.html">timespec</a> *&#160;</td>
          <td class="paramname"><em>ts</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generic <a class="el" href="timer_8c.html#aa6e5b6a9c1fb8bc6e2093fca40600bf5" title="Generic clock_gettime() function WITHOUT high resolution. ">clock_gettime()</a> function WITHOUT high resolution. </p>
<p>Read clock time into struct timepec *ts - POSIX function.</p>
<ul>
<li>Note: We ignore clk_id, and include low level counter offsets when available.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">clk_id</td><td>unused hardware clock index. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">ts</td><td>timespec result.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd>
<dd>
-1 on error. </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00377">377</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00184">clock_elapsed_begin()</a>, <a class="el" href="timer_8c_source.html#l00200">clock_elapsed_end()</a>, <a class="el" href="time_8c_source.html#l01227">display_clock()</a>, <a class="el" href="time_8c_source.html#l00822">gettimeofday()</a>, and <a class="el" href="time_8c_source.html#l00843">time()</a>.</p>

</div>
</div>
<a class="anchor" id="aa97274e3b8fdcd900c265d3808d5313c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void clock_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a4ebca9883466f2cc6fea0547e0e64e79"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int clock_settime </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="time_8h.html#afeece078c6706f33383bf11bbf584518">clockid_t</a>&#160;</td>
          <td class="paramname"><em>clk_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct <a class="el" href="structtimespec.html">timespec</a> *&#160;</td>
          <td class="paramname"><em>ts</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set system clock using seconds and nonoseconds - POSIX function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">clk_id</td><td>Hardware timer index used when there are more then one.<ul>
<li>Note: We ignore clk_id for now. </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ts</td><td>struct timespec input.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0. </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00345">345</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00221">clock_clear()</a>, <a class="el" href="time_8c_source.html#l00882">clock_set()</a>, <a class="el" href="time_8c_source.html#l01178">initialize_clock()</a>, <a class="el" href="time_8c_source.html#l00919">setdate_r()</a>, and <a class="el" href="time_8c_source.html#l00861">settimeofday()</a>.</p>

</div>
</div>
<a class="anchor" id="a182d70e09e9436c9c8a2e81b7597f206"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void clock_task </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>1000HZ timer task </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00276">276</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00293">init_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="a4b27b84577f0a45741aa4b1de370df66"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void delete_all_timers </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear ALL user timer tasks. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00117">117</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00293">init_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="a45ccd72c3ad32c4f7a5a8ef74d2653b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void disable_system_task </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="timer_8c_source.html#l00235">disable_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="abe2823a39b30ff55fe9326f2b5f0741e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void disable_timers </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable all timer tasks. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00235">235</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

</div>
</div>
<a class="anchor" id="a6802af23bc1fe764b975683a0b37fc91"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void display_ts </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>timespec structure in seconds.nanoseconds. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>timespec struct we want to display.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00167">167</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9827e02881cff25ff30c35c7d8ed3ac4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void enable_system_task </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="timer_8c_source.html#l00248">enable_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="a0e736ce66a2bc05cc14b7a282fa52b73"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void enable_timers </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable timer tasks. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00248">248</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00293">init_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="a7de37276c1b697f865594c7e5f28e961"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void execute_timers </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Execute all user timers at SYSTEM_HZ rate. Called by system task. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00261">261</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

</div>
</div>
<a class="anchor" id="a4a06b0b10204f441d18c79601b4ee13f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void init_timers </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setup all timers tasksi and enable interrupts. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="timer_8c.html#a182d70e09e9436c9c8a2e81b7597f206" title="1000HZ timer task ">clock_task()</a> </dd>
<dd>
: <a class="el" href="timer__hal_8c.html" title="timer hardware abstartion layer functions ">timer_hal.c</a> for hardware dependent interface </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p>See <a class="el" href="time_8c.html" title="Common Linux/POSIX time functions. ">time.c</a> </p>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00293">293</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00971">setup()</a>.</p>

</div>
</div>
<a class="anchor" id="a49353e09a3623d95083574b87e9aadc5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void install_timers_isr </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="timer_8c_source.html#l00293">init_timers()</a>.</p>

</div>
</div>
<a class="anchor" id="a71c3fe0e245c7b08e03a2fe0fbd88844"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int kill_timer </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Delete "Kill" one user timer task. </p>
<ul>
<li>"kill" is a common Linux term for ending a process.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>user timer task index.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>timer on success. </dd>
<dd>
-1 on error. </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00100">100</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

</div>
</div>
<a class="anchor" id="a35f94fb84f1b626d8d1ace062b26c932"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int set_timers </td>
          <td>(</td>
          <td class="paramtype">void(*)(void)&#160;</td>
          <td class="paramname"><em>handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Install a user timer task. </p>
<ul>
<li>timer argument is unsused, reserved for timer source.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">handler)</td><td>function pointer to user task. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>reserved for systems with additional low level hardware timers.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>timer on success. </dd>
<dd>
-1 on error. </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00060">60</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00293">init_timers()</a>, <a class="el" href="mmc__hal_8c_source.html#l00079">mmc_install_timer()</a>, and <a class="el" href="user__main_8c_source.html#l00166">ms_init()</a>.</p>

</div>
</div>
<a class="anchor" id="ab92d687bae984bd62c3d741f2ba614ed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void subtract_timespec </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>subtract a-= b timespec * structures. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>timespec struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>timespec struct.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl>

<p>Definition at line <a class="el" href="timer_8c_source.html#l00135">135</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00200">clock_elapsed_end()</a>.</p>

</div>
</div>
<a class="anchor" id="a41fb2edea84c2f17c7c6ad6ff87baeff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> char* ts_to_str </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="time_8h.html#a062a82a85c72b4a3020130efc37a00cf">ts_t</a> *&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="timer_8c_source.html#l00155">155</a> of file <a class="el" href="timer_8c_source.html">timer.c</a>.</p>

<p>Referenced by <a class="el" href="timer_8c_source.html#l00200">clock_elapsed_end()</a>, and <a class="el" href="timer_8c_source.html#l00167">display_ts()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
